//
//  GoldenVPNForgetPwdVC.m
//  QLadder
//
//  Created by xiongguobing on 2019/9/24.
//  Copyright © 2019 qding. All rights reserved.
//

#import "GoldenVPNForgetPwdVC.h"
#import "NSString+VerifyString.h"

@interface GoldenVPNForgetPwdVC ()
@property (weak, nonatomic) IBOutlet UITextField *nameTF;
@property (weak, nonatomic) IBOutlet UITextField *emailTF;

@end

@implementation GoldenVPNForgetPwdVC

- (void)viewDidLoad {
    [super viewDidLoad];
    
    self.title = @"找回密码";
    // Do any additional setup after loading the view from its nib.
}

- (IBAction)sureButtonClicked:(id)sender
{
    if (!self.nameTF.text.length) {
        kShowWithString(@"请输入用户名");
        return;
    }
    if (!self.emailTF.text.length || ![self.emailTF.text verifyWithEmail]) {
        kShowWithString(@"请输入正确的邮箱");
        return;
    }
    
    [kNetworkUtil postWithModuleURLStr:RetrievPassword parameters:@{@"email" : self.emailTF.text, @"userName" : self.nameTF.text} success:^(id response) {
        if ([response[@"code"] integerValue] == networkSuccessStatus) {
            kShowWithString(@"请求成功!");
        }
    } failure:nil withHud:YES];
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
